package com.wocharging.wxapp.controller;

import com.wocharging.wxapp.result.Result;
import com.wocharging.wxapp.service.WxAppService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/wxApp")
@Api(tags = "微信")
public class WxAppController {

    @Autowired
    private WxAppService wxAppService;

    @GetMapping("/login")
    @ApiOperation(value = "临时证明登录", notes = "")
    public Result<String> login(@RequestParam("code") String code) {
        return wxAppService.login(code);
    }
}
